<% @projects.each do |project| %>
  <li class="filtered-projects">
    <%= link_to project do %>
      <% starred = current_user.starred_project?(project) %>
      <span class="glyphicon <%= 'glyphicon-star star starred' if starred %>">
        <%= '&nbsp;'.html_safe unless starred %>
      </span>
      <%= project.name %>
    <% end %>
  </li>
<% end %>
